package org.yonggan.web.util;

import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

/**
 * Created by Administrator on 2018/1/4.
 */
public class App01 {

    public static void main(String[] args) throws NoSuchFieldException, NoSuchMethodException, InvocationTargetException, IllegalAccessException {

        Class<ClassGrade> gradeClass = ClassGrade.class;

        Method method = gradeClass.getMethod("getType");
        method.setAccessible(true);

        ClassGrade[] enumConstants = gradeClass.getEnumConstants();

        for (ClassGrade cg :enumConstants) {
            Object invoke = method.invoke(cg);
            System.out.println(invoke);
        }


        System.out.println(method);

    }
}